package com.boc.ewr.risk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.boc.ewr.risk.entity.PendCaInvalid;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description: 待处理无效账单清单
 * @Author: jeecg-boot
 * @Date: 2023-04-20
 * @Version: V1.0
 */
public interface PendCaInvalidMapper extends BaseMapper<PendCaInvalid> {

    @Select("select a.id, a.OWNER_PARENT_NO ADMIN_ORG_NO, a.PROTOCOL_BRANCH_NM ORG_BRANCH_NM, a.SIGN_BRANCH_NO ORG_BRANCH_NO, a.CA_NO, " +
            "'0' as ORC_MATCH, a.PROTOCOL_NO CA_PROTOCOL_NO, a.CUSM_NO, a.CUSM_NM, a.CA_MON from OCR_HANDED_LIST a " +
            "LEFT JOIN CA_RTN_LIST b ON a.CA_NO = b.CA_NO where b.CA_NO is NULL ;")
    List<PendCaInvalid> creatInfo();
}
